﻿
@using Akso.Entities
@using Akso.Web.Areas.Mpa.Models.Common.Modals
@model Akso.Web.Areas.BasicDataModule.Models.Codes.CreateOrEditCodeModalViewModel
@Html.Partial("~/Areas/Mpa/Views/Common/Modals/_ModalHeader.cshtml", new ModalHeaderViewModel(Model.IsEditMode ? (L("Pages_BasicDataModule_Codes_Edit") + ": " + Model.Code.CodeName) : L("Pages_BasicDataModule_Codes_Create")))
<div class="modal-body">

    <form name="ObjectForm" role="form" novalidate class="form-validation">
        <input type="hidden" name="CodeGroupID" value="@Model.Code.CodeGroupID" />
        @if (Model.IsEditMode)
        {
            <input type="hidden" name="Id" value="@Model.Code.Id" />
        }

        <div class="form-group form-md-line-input form-md-floating-label no-hint">
            <input type="text" name="CodeName" value="@Model.Code.CodeName" class="form-control edited" required maxlength="@CodeEntity.MaxNameLength" />
            <label>@L("Page_BasicDataModule_Codes_GridColumn_Name")</label>
        </div>
        <div class="form-group form-md-line-input form-md-floating-label no-hint">
            <input type="text" name="CodeKey" value="@Model.Code.CodeKey" class="form-control edited" required maxlength="@CodeEntity.MaxCodeKeyLength" />
            <label>@L("Page_BasicDataModule_Codes_GridColumn_Value")</label>
        </div>
        <div class="form-group form-md-line-input form-md-floating-label no-hint">
            <input type="text" name="SortIndex" value="@Model.Code.SortIndex" class="form-control edited" maxlength=4 />
            <label>@L("Page_BasicDataModule_CodeGroups_GridColumn_SortIndex")</label>
        </div>
        @*<div class="form-group form-md-line-input form-md-floating-label no-hint">
            <input type="text" name="CodeGroupID" value="@Model.Code.CodeGroupID" class="form-control edited" required />
            <label>@L("Page_BasicDataModule_CodeGroups_GridColumn_SortIndex")</label>
        </div>*@
    </form>

</div>

@Html.Partial("~/Areas/Mpa/Views/Common/Modals/_ModalFooterWithSaveAndCancel.cshtml")